﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="insertTruong.ascx.cs" Inherits="admin_insertTruong" %>
<table cellspacing="0" cellpadding="3" width="100%" border="0">
	<tr>
		<td colspan="4" align="left" class="HeadingTree" >Quản lý Trường</td>
	</tr>
	<tr>
		<td colspan="4">
		    <asp:validationsummary id="vdsTruong" CssClass="cssManField" runat="server" Font-Bold="True" BorderWidth="0" />
		    <asp:label id="lblMess" CssClass="cssManField" runat="server" />
		</td>
	</tr>
	<tr>
		<td align="right" style="width:15%;">
			<asp:label id="lblTruongName" CssClass="cssManField" runat="server" Text="<U>T</U>ên Trường:" />
		</td>
		<td style="width:50%;">
		    <asp:textbox id="txtTruongName" accessKey="n"   runat="server" MaxLength="128" Width="98%" />
		</td>
		<td style="width:3%;">
		    <asp:customvalidator id="ctvTruongName" runat="server" ControlToValidate="txtTruongName" ErrorMessage="Bạn phải nhập tên nguồn" Display="Static" Text="*" />
		</td>
		<td style="width:32%;" align="left">
			<asp:button id="btnInsert" accessKey="c" CssClass="cssButton" runat="server" Width="98px" Text="Tạo mới(c)" OnClick="btnInsert_Click" />&nbsp;
			<asp:button id="btnCancel" accessKey="r" CssClass="cssButton" runat="server" Width="98px" Text="Xóa trắng(r)" OnClick="btnCancel_Click" />
		</td>
	</tr>
	<tr>
		<td align="center" colSpan="4" style="height:524px;" valign="top">
		    <asp:GridView id="ddlTruong" runat="server" Width="100%" CellPadding="0" CellSpacing="0" 
		        AutoGenerateColumns="False" AllowPaging="true" 
		        HeaderStyle-CssClass="cssGridHeader" EditRowStyle-CssClass="cssGridEdit" RowStyle-CssClass="cssGridCell" 
		        AlternatingRowStyle-CssClass="cssGridAlterCell"  PagerStyle-CssClass="cssGridPager" SelectedRowStyle-CssClass="cssSelectedRow"
				DataKeyNames="ID" OnRowCancelingEdit="ddlTruong_RowCancelingEdit" 
				OnRowDataBound="ddlTruong_RowDataBound" OnRowDeleting="ddlTruong_RowDeleting" 
				OnRowEditing="ddlTruong_RowEditing" OnRowUpdating="ddlTruong_RowUpdating" 
                onpageindexchanging="ddlTruong_PageIndexChanging">
                 <PagerSettings Position="TopAndBottom" />

<RowStyle CssClass="cssGridCell"></RowStyle>
				<Columns>
					<asp:TemplateField Visible="False">
						<ItemTemplate>
							<asp:Label id="TruongID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ID") %>' />
						</ItemTemplate>
					</asp:TemplateField>
					<asp:BoundField DataField="Seq" ReadOnly="True" HeaderText="TT" ItemStyle-Width="4%" ItemStyle-HorizontalAlign="Right" />
					<asp:TemplateField HeaderText="Tên nhóm liên kết" ItemStyle-HorizontalAlign="Left">
						<ItemTemplate>
							<asp:Label id="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Ten") %>' />
						</ItemTemplate>
						<EditItemTemplate>
							<asp:Textbox id="txtTruongNameGV" runat="server"   Text='<%# DataBinder.Eval(Container, "DataItem.Ten") %>' Width="92%" MaxLength="64" />
							<asp:customvalidator id="ctvTruongNameGV" runat="server" Display="Static" ErrorMessage="Bạn phải nhập tên  nhóm liên kết"
								ControlToValidate="txtTruongNameGV">*</asp:customvalidator>
						</EditItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Sửa">
						<ItemStyle HorizontalAlign="Center" Width="9%"></ItemStyle>
						<ItemTemplate>
							<asp:ImageButton id="lbtEdit" runat="server" ImageUrl="~/images/Button/Edit.gif" ToolTip="Sửa mục từ" CommandName="Edit" />
						</ItemTemplate>
						<EditItemTemplate>
							<asp:ImageButton id="lbtUpdate" runat="server" ImageUrl="~/images/Button/Update.gif" ToolTip="Cập nhật bản ghi" CommandName="Update" />&nbsp;
							<asp:ImageButton id="lbtCancel" runat="server" ImageUrl="~/images/Button/Cancel.gif" ToolTip="Thôi" CommandName="Cancel" />
						</EditItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Xóa" HeaderStyle-HorizontalAlign="Center">
						<ItemStyle HorizontalAlign="Center" Width="8%"></ItemStyle>
						<ItemTemplate>
							<asp:ImageButton id="lbtDelete" runat="server" ImageUrl="~/images/Button/Delete.gif" ToolTip="Xóa bản ghi" CommandName="Delete" />
						</ItemTemplate>
					</asp:TemplateField>
				</Columns>

<PagerStyle CssClass="cssGridPager" HorizontalAlign="Center"></PagerStyle>

<SelectedRowStyle CssClass="cssSelectedRow"></SelectedRowStyle>

<HeaderStyle CssClass="cssGridHeader"></HeaderStyle>

<EditRowStyle CssClass="cssGridEdit"></EditRowStyle>

<AlternatingRowStyle CssClass="cssGridAlterCell"></AlternatingRowStyle>
			</asp:GridView>
		</td>
	</tr>
</table>
